package router

import (
	"demo/api"
	"github.com/gin-gonic/gin"
)

func UserRouter(c *gin.Engine) {
	userController := new(api.UserController)
	userGroup := c.Group("/user")
	userGroup.GET("/", userController.GetUserById)
	userGroup.GET("/list", userController.GetUserList)
	userGroup.GET("/page", userController.GetUserListByPage)
	userGroup.POST("/", userController.CreateUser)
	userGroup.DELETE("/", userController.DeleteUserById)
	userGroup.PUT("/", userController.UpdateUserById)
}
